package com.example.wan1.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.wan1.R;
import com.example.wan1.model.CollectWebBean;

import java.util.List;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

/***
 * 创建时间：2020/7/26 13:56
 * 创建人：10850
 * 功能描述：收藏网站 适配器
 */
public class CollectWebAdapter extends BaseQuickAdapter<CollectWebBean, BaseViewHolder> {

    public CollectWebAdapter(int layoutResId, @Nullable List<CollectWebBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, CollectWebBean item) {
        helper.setText(R.id.cw_tv_title, item.getName())
                .setText(R.id.cw_tv_link, item.getLink())
                .addOnClickListener(R.id.cw_iv_edit);
    }
}